<template>
  <div class="container">
        <div class="tip">
            修改密码
        </div>
     <input class="oldPasswd" type="password" placeholder="请输入原密码">
     <input class="newPasswd" type="password" placeholder="请输入要修改的密码">
     <button class="save" @click="savePasswd()">保存</button>
  </div>
</template>

<script>
import { forget } from '../../api/login';
export default {
    data() {
        return {
            from:{
                oldPasswd:'',
                newPasswd:'',
            }
        }
    },
    methods: {
        savePasswd(){
        forget(this.from).then(res=>{
              if(res.status===200){
                  this.$toast('修改成功')
              }else{
                  this.$toast('修改失败')
              }
          })
      }  
    }

}
</script>

<style lang="scss">
*{
    margin: 0;
    padding: 0;
}
.container{
    width: 100%;
    height: 100%;
    background: #fff;
}
.tip{
    width: 100%;
    height: 0.5rem;
    background: #fff;
    text-align: center;
    line-height: 0.5rem;
    font-size: 20px;
    color: #000;
    padding-top: 20px;
    padding-bottom: 20px;
}

.oldPasswd{
    border:none;
    width: 100%;
    height: 50px;
    border-top: 3px solid rgba(234, 227, 227, 0.403);
    border-bottom: 3px solid rgba(234, 227, 227, 0.403);
}
.newPasswd{
    border:none;
    width: 100%;
    height: 50px;
    border-bottom: 3px solid rgba(234, 227, 227, 0.403);
}
.save{
    margin-left: 9%;
    width: 80%;
    height: 50px;
    background: rgb(250, 83, 83);
    color: #fff;
    border: none;
    font-size: 20px;
    margin-top: 20px;
}
</style>